package com.ruoyi.system.domain.shopping;

import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import java.math.BigDecimal;

public class AllProducts extends BaseEntity {
    private static final long serialVersionUID = 1L;

    private Long productId;

    @Excel(name = "商品名称")
    private String name;

    @Excel(name = "商品描述")
    private String description;

    @Excel(name = "价格")
    private BigDecimal price;

    @Excel(name = "库存")
    private Integer stockQuantity;

    // --- 业务扩展字段 ---

    // 用于查询时传入当前用户ID，以便关联购物车
    private Long currentUserId;

    // 购物车中已存在的数量（如果未添加则为0或null）
    private Integer userCartQuantity;

    // Getters and Setters
    public Long getProductId() { return productId; }
    public void setProductId(Long productId) { this.productId = productId; }

    public String getName() { return name; }
    public void setName(String name) { this.name = name; }

    public String getDescription() { return description; }
    public void setDescription(String description) { this.description = description; }

    public BigDecimal getPrice() { return price; }
    public void setPrice(BigDecimal price) { this.price = price; }

    public Integer getStockQuantity() { return stockQuantity; }
    public void setStockQuantity(Integer stockQuantity) { this.stockQuantity = stockQuantity; }

    public Long getCurrentUserId() { return currentUserId; }
    public void setCurrentUserId(Long currentUserId) { this.currentUserId = currentUserId; }

    public Integer getUserCartQuantity() { return userCartQuantity; }
    public void setUserCartQuantity(Integer userCartQuantity) { this.userCartQuantity = userCartQuantity; }
}
